package com.edu.jvm.unit01.stingtable;

import org.junit.Test;

/**
 * @author five-five
 * @created 2021/10/27-20:22
 */
public class TestString01 {
    @Test
    public void test01() {
        String s1 = "a" + "b" + "c";//存在编译器优化现象
        String s2 = "abc";//直接指向常量池的"abc"
        System.out.println(s1 == s2);
        System.out.println(s1.equals(s2));
    }
}
